<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<title>门诊发票报表管理</title>
<meta name="decorator" content="default"/>
<%-- <script src="${ctxStatic}/common/change/change.js"></script> --%>
<script type="text/javascript">
function page(n,s){
	$("#pageNo").val(n);
	$("#pageSize").val(s);
	$("#searchForm").submit();
    return false;
}
</script>

<style type="text/css">
	body{
		padding:10px;
	}
	.minWidth {
		min-width: 177px;
	}	
	#contentTable td ,#contentTable th{
		text-align: center;
		padding:1px 2px;
	}
	#contentTable tbody tr td{
		font-size: 13px;
	}
</style>
</head>
<body>
	<form:form id="searchForm" modelAttribute="bsChargeLog" action="${ctx}/chargelog/bsChargeLog/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<table class="table table-bordered">
		    <tr>
				<th>接种门诊：</th>
				<td>
					<form:input path="department" id="department" class="span2 minWidth" readonly="true" disabled="true"/>
				</td>
				<th>缴费起始日期</th>
				<td>
					<input name="beginDate" id ="beginDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate" readonly="readonly" disabled="disabled"
						value="<fmt:formatDate value="${bsChargeLog.beginDate}" pattern="yyyy-MM-dd"/>"
						onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
				</td>
				<th>缴费截止日期</th>
				<td>
					<input name="endDate" id ="endDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate" readonly="readonly" disabled="disabled"
						value="<fmt:formatDate value="${bsChargeLog.endDate}" pattern="yyyy-MM-dd"/>"
						onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
				</td>
			</tr>
		</table>
		<!-- <input onclick="down()" class="btn btn-primary" type="button" value="导出"/> -->
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
			    <th>编号</th>
				<th>接种人姓名</th>
				<th>业务流水号</th>
				<th>接种门诊</th>
				<th>疫苗名称</th>
				<th>生产企业</th>
				<th>批号</th>
				<th>剂量</th>
				<th>单价</th>
				<th>针次</th>
				<th>总价</th>
				<th>是否退款</th>
				<th>退款金额</th>
				<th>缴费日期</th>
				<th>支付方式</th>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="bsChargeLog" begin="0" varStatus="status">
			<tr>
			    <td>
					${(page.pageNo-1)*page.pageSize+status.index+1 }
				</td>
				<td>
					${bsChargeLog.patientName}
				</td>
				<td>
				    ${bsChargeLog.billNum}
				</td>
				<td>
					${bsChargeLog.department}
				</td>
				<td>
				    <c:if test="${not empty bsChargeLog.vaccName}">
					   ${bsChargeLog.vaccName}
				    </c:if>
				    <c:if test="${empty bsChargeLog.vaccName}">
					   无
				    </c:if>
				</td>
				<td>
					${bsChargeLog.vaccManufacturer}
				</td>
				<td>
					${bsChargeLog.vaccBatchnum}
				</td>
				<td>
					${bsChargeLog.vaccDose}
				</td>
				<td style = "text-align: right; padding-right: 8px">
					￥${bsChargeLog.vaccPrice}
				</td>
				<td>
					${bsChargeLog.vaccCount}
				</td>
				<td style = "text-align: right; padding-right: 8px">
					￥${bsChargeLog.pay}
				</td>
				<td> 
				    <c:if test="${bsChargeLog.status == '2'}">
				                       是
				    </c:if>
				    <c:if test="${bsChargeLog.status == '1'}">
				                       否
				    </c:if>
				</td>
				<td> 
				    <c:if test="${bsChargeLog.status == '2'}">
				          ${bsChargeLog.updateSumPrice}
				    </c:if>
				    <c:if test="${bsChargeLog.status == '1'}">
				          -
				    </c:if>
				</td>
				<td>
					<fmt:formatDate value="${bsChargeLog.createDate}" pattern="yyyy-MM-dd"/>
				</td>
				<td>
					${fns:getDictLabel(bsChargeLog.paytype, 'payType', '') }
				</td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>